reftest: Clean up reftest_inhibit_snapshot()
authorAlexander Larsson <alexl@redhat.com>
Thu, 4 Jun 2020 13:45:29 +0000 (15:45 +0200)
committerAlexander Larsson <alexl@redhat.com>
Thu, 4 Jun 2020 13:45:29 +0000 (15:45 +0200)
commit5059854a2eceb93a31800610f0af9043eb1f2ff1
tree301d44d167b01a8d5ec7d205d5fdc68fabbcfd45
parentaa8a061a83208ab3a8c3af3aebc49e3c6e48e791
reftest: Clean up reftest_inhibit_snapshot()

This was done in a weird way where we always call reftest_uninhibit_snapshot()
on paint, and then re-inhibited it if it wasn't inhibited. To make this
work it also started with an extra inhibit.

This is very contorted and based on how this historically worked. This
changes it to just do:

  if (inhibit_count > 0)
    return;

And keep inhibit_count at its initial zero value unless it is actually
inhibited.
testsuite/reftests/reftest-snapshot.c